import { Tensor, Variable } from './tensor'
import { DataType } from './types'

/** @docalias {[name: string]: Tensor} */
export type NamedTensorMap = {
  [name: string]: Tensor
}

export type NamedVariableMap = {
  [name: string]: Variable
}

/**
 * @docalias void|number|string|Tensor|Tensor[]|{[key:
 * string]:Tensor|number|string}
 */
export type TensorContainer =
  | void
  | Tensor
  | string
  | number
  | boolean
  | TensorContainerObject
  | TensorContainerArray
export interface TensorContainerObject {
  [x: string]: TensorContainer
}
export interface TensorContainerArray extends Array<TensorContainer> {}

export interface TensorInfo {
  // Name of the tensor.
  name: string
  // Tensor shape information, Optional.
  shape?: number[]
  // Data type of the tensor.
  dtype: DataType
}
